/**
 * 获取商场列表
 * @author Ice <iceinto@mallog.com.cn>
 */
(function ($) {
    $.fn.malllist = function (options) {
        var settings = {bus:"div.tiny>a"};
        var cbd = 0;
        if (options) {
            $.extend(settings, options);
        }
        var getHtml = function (i) {
            $("#malllist").html("Loading...");
            $url = m.app + "/bus/mall/list/" + i;
            $.get($url, function (result) {
                if (result.status) {
                    $("#malllist").html(result.data);
                } else {

                }
            }, "json");
        }
        $(settings.bus).click(function () {
            var self = this;
            // Remove on
            $(settings.bus).removeClass('on');
            // This add on class
            $(self).addClass('on');
            // Get html
            cbd = $(self).data('bid')
            getHtml(cbd);
        });
        $(settings.bus).eq(1).addClass('on');
        getHtml(cbd);
    }
})(jQuery);